package Homework4;

import java.util.*;

public class Homework4_2_TestStock {
    public static void main(String[] args) {
        Scanner input  = new Scanner(System.in);
        String symbol;
        String name;
        double previousClosingPrice;
        double currentPrice;
        symbol = input.nextLine();
        name = input.nextLine();
        previousClosingPrice  = input.nextDouble();
        currentPrice = input.nextDouble();
        Stock stock = new Stock(symbol, name);
        stock.setPreviousClosingPrice(previousClosingPrice);
        stock.setCurrentPrice(currentPrice);
        // Display stock info
        System.out.println(stock.getName()+"("+stock.getSymbol()+")");
        System.out.println("Previous Closing Price: " +
                stock.getPreviousClosingPrice());
        System.out.println("Current Price: " +
                stock.getCurrentPrice());
        System.out.println("Price Change: " +
                stock.getChangePercent() * 100 + "%");
    }
}
